fix(deps): update dependency watch_it to v2 #1387
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.5.0->2.0.1Release Notes
escamoteur/watch_it (watch_it)
v2.0.1Compare Source
Maintenance
v2.0.0Breaking Changes
functional_listener ^4.0.0withlisten_it ^5.1.0. This is a breaking change asfunctional_listenerhas been renamed and restructured intolisten_it. If you usefunctional_listeneroperators in your code, update your imports frompackage:functional_listener/functional_listener.darttopackage:listen_it/listen_it.dart.watchValue()andregisterHandler()now default toallowObservableChange: falsefor better performance and memory leak prevention. This means the selector function is only called once on first build. If you need to dynamically switch observables (e.g.,condition ? obsA : obsB), setallowObservableChange: true. This prevents common memory leaks from inline chain creation likewatchValue((m) => m.source.map(...)).New Features
callAfterFirstBuild()function that executes a callback once after the first frame has been rendered. This is useful for operations that require the widget tree to be fully built and laid out, such as showing dialogs, accessing widget dimensions, scrolling to positions, or starting animations that depend on final widget sizes. This replaces the common pattern of usingWidgetsBinding.instance.addPostFrameCallbackininitState().callAfterEveryBuild()function that executes a callback after every frame has been rendered. This is useful for operations that need to run after each rebuild, such as updating scroll positions, repositioning overlays, or performing measurements. The callback includes acancel()function to stop future invocations when needed.Performance Improvements
watchValue()andregisterHandler()now have zero overhead on rebuilds with default settings - selectors are only called once instead of on every buildStateErrormessages when observables change unexpectedly withallowObservableChange: false, guiding users to the correct fixBug Fixes
createOnceAsynctest isolation issue by properly resettingtestCompleterinsetUptarget→parentOrListenable, etc.)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.